﻿@using System.Data
@using System.Diagnostics
@using CMSMVC4.Filters
@using CMSMVC4.MultiResource
@model System.Data.DataTable
@{Html.RenderAction("GetBanertop", "Menu", new { type = BanerType.TinTuc });}
<div id="main_mid">
    <div id="dichvu_mid_left">
        @{Html.RenderAction("ListTinTuc", "TinTuc");}
        @*@{Html.RenderAction("ListNewsHot", "TinTuc");}*@ @* @{Html.RenderAction("ListContact", "LienHe");}*@
        @{Html.RenderAction("GetBanerleft", "Menu", new { type = BanerType.TinTuc });}
    </div>
    <div id="dichvu_mid_right">
        <div id="tintuc">
            @*@{Html.RenderAction("ListTinXemNhiew", "TinTuc", new { idcate = DetailBag.Id });}*@
            @*@if (DetailBag.tinkhac != null)
            {
                var datatinkhac = DetailBag.tinkhac as DataTable;
                <div id="loadtintuc">
                    <div id="tintuc_tinkhac">
                        <div class="tintuc_tinkhac_title">
                            @Resource.InOtherNews
                        </div>
                        @{
                Debug.Assert(datatinkhac != null, "datatinkhac != null");
                        }
                        @for (int i = 0; i < datatinkhac.Rows.Count; i++)
                        {
                            <div class="tintuc_tinkhac_bantin">
                                <div class="tintuc_tinkhac_bantin_anhbia">
                                    <a href="@Url.Action("BaiViet", "TinTuc", new { id = datatinkhac.Rows[i]["PageId"].ToString() })">
                                        <img src="@datatinkhac.Rows[i]["Img"].ToString()" width="213" height="118" alt="rew" boder="0" />
                                    </a>
                                </div>
                                <div class="tintuc_tinkhac_bantin_data">
                                    <div class="tintuc_tinkhac_bantin_data_title">
                                        <a href="@Url.Action("BaiViet", "TinTuc", new { id = datatinkhac.Rows[i]["PageId"].ToString() })">
                                            @datatinkhac.Rows[i]["Name"].ToString()
                                        </a>
                                    </div>
                                    <div class="tintuc_tinkhac_bantin_data_conten">
                                        @Html.Raw(datatinkhac.Rows[i]["Summary"].ToString())
                                    </div>
                                </div>
                            </div>
                        }
                    </div>
                </div>
                <div id="tintuc_phantrang" align="center">
                    <div id="load_page" style="margin-left: 5px">
                    </div>
                </div>
            }*@
            @if (ViewBag.tinkhac != null)
            {
                var datatinkhac = ViewBag.tinkhac as DataTable;
                <div class="tintuc_new">
                    @for (int i = 0; i < datatinkhac.Rows.Count; i++)
                    {
                        <a href="@Url.Action("BaiViet", "TinTuc", new { id = datatinkhac.Rows[i]["PageId"].ToString() })">
                            <div class="tintuc_noidung">
                                <div class="tintuc_image">
                                    <img src="@datatinkhac.Rows[i]["Img"].ToString()" width="173" height="100" boder="0" />
                                </div>
                                <div class="tintuc_title">
                                    @datatinkhac.Rows[i]["Name"].ToString()
                                </div>
                            </div>
                        </a>
                    }
                </div>
                <div id="tintuc_phantrang" align="center">
                    <div id="load_page" style="margin-left: 10px">
                    </div>
                </div>
            }
        </div>
        @if (ViewBag.IdPage != null)
        {
            Html.RenderAction("ListComment", "Comment", new { id = ViewBag.IdPage });
            <div id="load_comment">
                <div class="commenttitle">
                    <div class="dinhvu_mid_right_textbinhluan">
                        BINH LUAN</div>
                    <div class="commenterror">
                    </div>
                </div>
                <div class="dichvu_mid_right_binhluan">
                    @using (Ajax.BeginForm("SendComment", "Comment", new AjaxOptions() { HttpMethod = "Post", UpdateTargetId = "load_comment" }))
                    {
                        <input name="id" value="@ViewBag.IdPage" type="hidden" />
                        <input name="email" class="emailcomment" placeholder="@Resource.Comment_email" />
                        <textarea name="data" class="datacomment" placeholder="@Resource.Comment_data"></textarea>
                        <input  class="sendcomment" type="submit" value="@Resource.Comment_submit" />
                    }
                </div>
            </div>
        }
    </div>
</div>
<script language="javascript" type="text/javascript"> $(function () { var id = @ViewBag.Id;
var size = $('#dichvu_mid_left_warpermenu .dichvu_mid_left_menu').size(); for (var
i = 0; i < size; i++) { if ($('.dichvu_mid_left_menu').eq(i).attr('index') == id)
{ $('.dichvu_mid_left_menu').eq(i).css({'background-image': 'url(/Images/Css/img/hover_03.png)'});
} else { $('.dichvu_mid_left_menu').eq(i).css({'background-image': 'url(/Images/Css/img/menu-small_06.png)'});
} } $('.dichvu_mid_left_menu').hover(function() { if ($(this).attr('index') != id)
{ $(this).css({'background-image': 'url(/Images/Css/img/hover_03.png)'}); } }, function()
{ if ($(this).attr('index') != id) { $(this).css({'background-image': 'url(/Images/Css/img/menu-small_06.png)'});
} }); }); </script>
<script type="text/javascript" language="javascript"> $(document).ready(function()
{ pages(@ViewBag.page, @ViewBag.page, @ViewBag.count); }); function loadpages(page)
{ var url = "/TinTuc/Index/@ViewBag.Id?page=" + page; window.location = url; } </script>
